package com.wlj.security.core.social.view;

import org.springframework.web.servlet.view.AbstractView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * 社交账号绑定/解绑成功返回视图
 */
public class WljConnectView extends AbstractView {
    @Override
    protected void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request,
                                           HttpServletResponse response) throws Exception {
        response.setContentType("text/html;charset=UTF-8");
        if(model.get("connections")!=null){
            response.getWriter().write("<h3>绑定成功</h3>");
        }else{
            response.getWriter().write("<h3>解绑成功</h3>");
        }

    }
}
